package com.cms.controller.front;

import com.cms.entity.Tag;
import com.cms.service.TagService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.RequestMapping;

/**
 * Controller - 标签
 * 
 * 
 * 
 */
@Slf4j
@Controller("frontTagController")
@RequestMapping("/tag")
public class TagController extends BaseController {

	@Autowired
	private TagService tagService;

	/**
	 * 标签
	 */
	@RequestMapping
	public String index(Integer id, ModelMap modelMap) {
		log.info("标签信息...");
		Tag tag = tagService.getById(id);
		modelMap.addAttribute("currentTag",tag);
		return "/templates/"+getCurrentTemplate()+"/tag.html";
	}
}





